Use typeof name, instead of name.constructor.