Added empty field error handling