Added validation method for passed in degree.