Added support for types

Also fixed issue where 0 was being treated as undefined
Merge pull request #1 from trevorparscal/file-types

Added support for types