public static function getProfile(MongoId $studentId) { $profileData = StudentModel::getProfile($studentId); if ($profileData === null) { $profileData = []; } return new StudentProfile($studentId, $profileData); }