added new method and fixed a bug

Added get(string key, type defaultValue) and fixed a bug when returning
null values