Proper checks for error message functions