Check object validity