Added a few NullPointer Checks