Error in saving data(input) to data sets(collections) after adding IF statement

Thank you J.D for your answer, I checked the permissions nothing is wrong with it, actually it is write only cuz it`s a form that is needed to be filled by the client