Check for presence of 'credentials' before filtering

Partial-bug: #1275254
Change-Id: I0576ef0c6c217fbaa60fc2caa614a966132fcda1
Merge "Check for presence of 'credentials' before filtering"