#6063: validate object in javascrip