Fixed type checks. Removed toString.