Fixed null casting