check for null handler
update sample