extracted generation of null checks to outside render methods
Source formatting