Changed undefined error to null to match node.js guidelines (http://docs.nodejitsu.com/articles/getting-started/control-flow/what-are-callbacks). Thanks @tbranyen