adding check type decorator function