Fix #2: better `jws.isValid` function.
Better jws.isValid function