Improved isBinary method. Refs #7866.