mon: Properly handle errors from 'cmd_getval()' when needed

Not handling the error return from cmd_getval() may leave uninitialzied
values, which can cause issues, specially with non-string values.

Fixes: 6806

Patch series also have another two patches that have the monitor check for invalid arguments instead of blindly rely on the client to perform their validation.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>