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.
One liner. Dont call function parseAccept() twice in RequestHandlerComponent.
Merge pull request #2873 from sam-at-github/requesthandlercomponent-reuse-a-var

One liner. Dont call function parseAccept() twice in RequestHandlerCompo...
Merge remote-tracking branch 'upstream/master'