Minor code clean up:  Check if protocol buffer optional Algorithm (enum)
field is set (after read from store) before getting/setting its value in
the response message.  

This is to eliminate setting INVALID_ALGORITHM in the optional field in
(GET) response message unintentionally.