sanitizing sort_by param