modified isFieldEmpty method (not complete)