add check for returning type
Merge pull request #94 from prestonp/master

add check for returning type