Fixed null/undefined checking bug.