hmm depending on the specific config object passed an appropriate encryption service always would be returned.  The issue is with wrong crypto params passed on those config object which in that case attempting to read will fail ('data' will be nil). That is the reason have put a comment on the code.  

Let me know if I haven't understand correctly