Use Objects equals instead of == where necessary