Implemented Resource.is(type) method. Fixed a bug in the modal