returning nil/null if the input is nil/null