adjust return result according to requirement in null case