In XSLT there is no Null value. To represent a missing value, you can use a zero length string or an empty sequence. They are not the same thing - an empty sequence would return 0 from count($x) but a zero length string is a sequence containing one item of type xs:string which has a string length of 0 (count($x) = 1 and string-length($x) =0).
Most of the standard XPath functions accept either a zero length string or an empty sequence but your custom function may not.
The problem may be occuring if you're selecting the seqeunce of characters. For example, if you select the value of a nodes that contains the string the node does not exist, you'll get an empty sequence - but if the node exists and the value is empty, you'll get the empty-string.
Modify the way you select the value to always have the empty string (or wrap/change the isValidDate function to accept the empty-sequence). The following function defintion will accept the empty sequence and convert it to a zero length string
<xsl:function name="cda:isValidDate" as xs:boolean">
<xsl:param name="datestring" as="xs:string?/>
<xsl:varaible name="reallyastring" select="string($datestring)"/>
Your code
</xsl:function>
The ? on the xs:string? param type allows one or no items to be provided. The string(...) function never returns an emptry string so will convert the empty sequence to a zero length string.