Added check that variable is Object before cloning on it. Also added handles in case getImage returns null
Merge pull request #17 from SGulseth/master

Added check that variable is Object before cloning on it.