public static boolean isValidAction(final String action){
  if (action == null) {
    return false;
  }
 else {
    return ACTIONS.contains(action);
  }
}

public static boolean isValidAction ( final String action ) { if ( action == null ) { return false ; } else { return ACTIONS . contains ( action ) ; } }
checks if a given string represents a valid action .
