Added optional  built in type-testing in monads.
Advanced built-in type checking in monads.