Added simple type check.