Add null pointer check for league