Added checks for null and equal class to .equals()

Also switched a check for null in OreHelper#sameOre to prevent null ==
null => true
Merge pull request #188 from yueh/cleanup-code

Added checks for null and equal class to .equals()