isElement function added