added extra check to ensure field supports null values