refactor out null objects