took in pending PR changes from the upstream repo for handling null input values