diff --git a/src/Models/Company/Director.php b/src/Models/Company/Director.php index 04b3678..cc891ba 100644 --- a/src/Models/Company/Director.php +++ b/src/Models/Company/Director.php @@ -78,9 +78,13 @@ public function getGender() : string * * @return DateTime Returns the Date Of Birth of the Director */ - public function getDateOfBirth() : \DateTime + public function getDateOfBirth() : ?\DateTime { - return $this->directorDetails['dateOfBirth']; + if (isset($this->directorDetails['dateOfBirth'])) { + return $this->directorDetails['dateOfBirth']; + } + + return null; } /**