If you know this is null at this point, you should just return the communityID, no need passing it to the formatHomeCommunityId.