The expression return Usamamuneerchaudh...::find($notificationId) could return the type Illuminate\Database\Eloq...gHasThroughRelationship which is incompatible with the type-hinted return Usamamuneerchaudhary\Not...odels\Notification|null. Consider adding an additional type-check to rule them out.