Solve "Details: TypeError: Object.keys called on non-object"