See issues 4 and 5. Added type checking functions to vsm (at the risk of provoking the wrath of the ducking-typing gods).