First we check if the given parameter is a blessed reference, that is if it is
an instance of anything.
Then we check if it is a instance of DateTime using the
appropriately named isa method from the UNIVERSAL
package.
We need to have this 2-step checking as the isa method calling would throw an exception if the
variable $value did not contain an object.