Fixed NPE on equals(). Thanks to vinicios.torres@gmail.com