Check for valid output and space.