Fix typespecs, add guards to make it explicit.