Changing !isset to is_null (thanks Roan!) and fixing some coding style stuff