Make proper type check.