Add w method to detect whether an object is w