Equating to null should use .equals( ) method.
Added spaces for readability.
Added handlings for @null value.