Closes #973 by adding a check around the variable for null before calling the properties.
Closes #973 by adding a check around the variable for null before calling the properties.

JimMackin/SuiteCRM,gcoop-libre/SuiteCRM,ghermans/SuiteCRM,scottiems/crm-limai,ghermans/SuiteCRM,lionixevolve/SuiteCRM,KhyberPass/SuiteCRM,horus68/SuiteCRM-Horus68,lionixevolve/LionixCRM,leonardobarrientosc/SuiteCRM,recci/SuiteCRM,horus68/SuiteCRM,JimMackin/SuiteCRM,noelhunter/SuiteCRM,haris-raheem/SuiteCRM,ChangezKhan/SuiteCRM,salesagility/SuiteCRM,lionixevolve/LionixCRM,Accendere/SuiteCRM,Dillon-Brown/SuiteCRM,salesagility-davidthomson/SuiteCRM,JimMackin/SuiteCRM,daniel-samson/SuiteCRM,dfstrauss/SuiteCRM,nadilhassan/SuiteCRM,nadilhassan/SuiteCRM,pgorod/SuiteCRM,noelhunter/SuiteCRM,digitalmcgrath/SuiteCRM,gunnicom/SuiteCRM,pgorod/SuiteCRM,jakubpas/SuiteCRM,horus68/SuiteCRM-Horus68,samus-aran/SuiteCRM,cumanacr/SuiteCRM,noelhunter/SuiteCRM,lionixevolve/LionixCRM,lionixevolve/LionixCRM,cumanacr/SuiteCRM,adamjakab/SuiteCRM,MikeyJC/SuiteCRM,Dillon-Brown/SuiteCRM,MikeyJC/SuiteCRM,lionixevolve/SuiteCRM,scottiems/crm-limai,digitalmcgrath/SuiteCRM,pribeiro42/SuiteCRM,gody01/SuiteCRM,cumanacr/SuiteCRM,pribeiro42/SuiteCRM,Accendere/SuiteCRM,daniel-samson/SuiteCRM,willrennie/SuiteCRM,gunnicom/SuiteCRM,pgorod/SuiteCRM,JanSiero/SuiteCRM,samus-aran/SuiteCRM,dfstrauss/SuiteCRM,pribeiro42/SuiteCRM,shogunpol/SuiteCRM,dfstrauss/SuiteCRM,samus-aran/SuiteCRM,haris-raheem/SuiteCRM,noelhunter/SuiteCRM,gunnicom/SuiteCRM,salesagility/SuiteCRM,lionixevolve/LionixCRM,MikeyJC/SuiteCRM,leonardobarrientosc/SuiteCRM,root-smith/SuiteCRM,horus68/SuiteCRM,pgorod/SuiteCRM,krzyc/SuiteCRM,jakubpas/SuiteCRM,JanSiero/SuiteCRM,root-smith/SuiteCRM,horus68/SuiteCRM-Horus68,KhyberPass/SuiteCRM,shogunpol/SuiteCRM,root-smith/SuiteCRM,horus68/SuiteCRM-Horus68,daniel-samson/SuiteCRM,gody01/SuiteCRM,Dillon-Brown/SuiteCRM,salesagility-davidthomson/SuiteCRM,KhyberPass/SuiteCRM,ryoon/SuiteCRM,gcoop-libre/SuiteCRM,KhyberPass/SuiteCRM,shogunpol/SuiteCRM,digitalmcgrath/SuiteCRM,gymad/SuiteCRM,salesagility/SuiteCRM,jakubpas/SuiteCRM,shogunpol/SuiteCRM,leonardobarrientosc/SuiteCRM,leonardobarrientosc/SuiteCRM,gody01/SuiteCRM,ChangezKhan/SuiteCRM,lionixevolve/SuiteCRM,salesagility-davidthomson/SuiteCRM,JimMackin/SuiteCRM,gymad/SuiteCRM,pribeiro42/SuiteCRM,ChangezKhan/SuiteCRM,willrennie/SuiteCRM,Accendere/SuiteCRM,Dillon-Brown/SuiteCRM,haris-raheem/SuiteCRM,krzyc/SuiteCRM,gymad/SuiteCRM,willrennie/SuiteCRM,lionixevolve/LionixCRM,gunnicom/SuiteCRM,MikeyJC/SuiteCRM,adamjakab/SuiteCRM,recci/SuiteCRM,salesagility/SuiteCRM,nadilhassan/SuiteCRM,willrennie/SuiteCRM,lionixevolve/SuiteCRM,horus68/SuiteCRM,JanSiero/SuiteCRM,gymad/SuiteCRM,daniel-samson/SuiteCRM,Accendere/SuiteCRM,gcoop-libre/SuiteCRM,gcoop-libre/SuiteCRM,samus-aran/SuiteCRM,cumanacr/SuiteCRM,scottiems/crm-limai,ryoon/SuiteCRM,recci/SuiteCRM,scottiems/crm-limai,root-smith/SuiteCRM,ryoon/SuiteCRM,salesagility-davidthomson/SuiteCRM,gody01/SuiteCRM,krzyc/SuiteCRM,adamjakab/SuiteCRM,nadilhassan/SuiteCRM,JanSiero/SuiteCRM,ChangezKhan/SuiteCRM,recci/SuiteCRM,ghermans/SuiteCRM,adamjakab/SuiteCRM,dfstrauss/SuiteCRM,krzyc/SuiteCRM,haris-raheem/SuiteCRM