check for required fields