checking if id_field is valid rather than null. could be an empty string