Added file? and pipe? methods.