fixing Method's equals method and dereferencing null return type ...