from doctormanagement.models import Speciality

def get_speciality(text):
    if text == None or text.lower()=='none':
        return None
    else:
        return Speciality.objects.get(speciality_area=text)