Use hasattr to see if a foreign key exists
PEP 8 [PD-863]
Merge pull request #1071 from DirectEmployers/no-companyprofile

Use hasattr to see if a foreign key exists