duck-type Cons.from
move Identifier to types
add more convenient type checking