added calculator sample and fix for null arguments