improved type checking in stream handler, better syntax for room member check, started js api