M: add 'isPath' method for checking file/not file attributes.