#173 added checks for null and blank values