Prevent keypath traversal on primitives

#4