Refactored query validation in CourseResourceImpl into its own method.