Bare code for checking stdin, which shouldn't be used until a wrapper is written for input streams