checks if the field exists before processing