Add tests for the JS::is_defined method