fix null cast