Factorize null object creation to improve performance