Fix datetime constructor null-pointer

Using constructorParamsDefaultToNull and DateTime can produce "null-pointer-exception" when attribute is paased by null (or not passed). At first, I've created a test for this and after that fix the bug.