account for localized floats more robustly.

Normalize floats, strings too, so that they are validated as

    dddddddddd.dd

ref #2853
Merge pull request #2864 from AD7six/2.4-better-float-validation

account for localized floats more robustly.
Make sure a datetime instance is valid to avoid fatal errors.
Fix types in docblocks.
Don't do assignments inside conditionals.
Merge pull request #2869 from jalbertocr/master

FormHelper - Check DateTime instances to avoid fatal errors
Simplify conditionals.

Set default values to remove else cases.