remove hard-coded Date type checking

use IsAssignableFrom instead of hard-coded Date type checking