Update utils.js (issue #478)

Fixed exception in keys function when the argument is not an object.