Fix for validate being called on undefined values.