Camera: Add checker for null pointer exception during camera release

In current code, handler will still try to execute command even
camera is closed, so add null point checker to skip these commands

( cherrypicked from commit 63ae64c56b00f44956502822a0ddb96307ae7270 )

Change-Id: I71c30a5293364e084de650e92d9d0926e7e3d7c1
CRs-Fixed: 598600