Consistency.
Added hasOwnProperty check. Fixes #2.