Add union

Ok, for real this time? @ttrefren @tdumitrescu 
this is now used in 5 places; I think it merits a simple refactoring into a function like `is_reserved_key(k)` (and using ===).