checking sort parameter to be in supported types