Added new methods

Added a new validation to equals method
Added isEmpty method.