Added optional  built in type-testing in monads.