'ename': employee.name, AttributeError: 'NoneType' object has no attribute 'name'

In the models.py the name code:
name = models.TextField(max_length=50, db_index=True, blank=True)
gender = models.CharField(max_length=2, null=False, choices=GENDER_TYPE, blank=True)
dob = models.DateField(null=True, blank=True)

in the context_helper.py the code:

def get_emp_info(employee):

blood_groups = blood_group_helper()
genders = gender_helper()
info = {
    'ename': employee.name,
    'dob': employee.dob,
    'gender': [i for i in genders if employee.gender in i],
    'phone': employee.phone,
    'address': employee.curr_address,
    'emp_id': employee.e_id,
    'bgroup': [i for i in blood_groups if employee.blood_group in i],
    'photo': os.path.join(settings.MEDIA_URL, employee.photo.name) if employee.photo else None,
return info

But in the terminal it shows

'ename': employee.name,

AttributeError: ‘NoneType’ object has no attribute ‘name’

what is happening into in it ? How is the solution?