argument_handler now bound checks key and value access, and throws out invalid arguments from array