Fixed null-check