Update couchpotato.js

Add check to make sure object exist, if not it will throw JS error