Fixed potential NPE, fixed comparison to use equals which is more appropriate for String
Refactored retrieval of study type to StudyType class
Changing method to reflect change from static to instanced method