check if key exists before reading it
fix check if app is enabled
Merge pull request #4991 from owncloud/enc_fix_warning

check if key exists before reading it