added object and function checks