@Nikhil-Kumar it seems to me like a javascript/Promise (miss)handling in the code. Using "return" directly won't wait for the Promise to complete. Using Promise's "resolve" is the right way to return a response.
Please also make sure that your action returns a Promise. If it doesn't return a Promise, while invoking another javascript module which uses Promises, then javascript finishes your action before the other Promise finishes, hence returning a null object.
Hoping this helps !