added null check when getting model attribute #81