Null check for returned value in proxying