fixed null pointer reference for emoty object