Fix prescription date validation.

Makes sure to only validate the prescription date when that date is a
valid date object.

Change-Id: Iba5c78456cd4fc06dedff66d67fa76d4037a2482