you don't need to check if object is null when you are doing instanceof.

http://stackoverflow.com/questions/2950319/is-null-check-needed-before-calling-instanceof