Take care of NULL case in creating object