Message receive function accepting NULL parameter and one bug fix

Change-Id: I09e61cfbdde0b74d1b97ae627392715d0fd3ffdb
Signed-off-by: TanelDettenborn <tanel.dettenborn@intel.com>