I have this if statement
if((check1==null||!check1.isSolid())&&(check2==null)||!check2.isSolid())
it throws a null pointer exception because check1 or check2 are null, but i don't understand why it is doing this, because i am checking for the null condition before i am accessing the object and if the object is null why would java bother checking isSolid because it would have already been true.