added object declaration validation