Simple object validation for JavaScript.