Add type check for string on $date

Add tests for string based $date