added error handling for an empty action by the user