api: Check user callbacks before using.
api: Check user callbacks before using.

One can compile with support for CLIENT and SERVER and in this case one
of the oc_handler_t may have not be necessary.

Change-Id: I634cb8f01d3490f4f40c759adccdb8e8704409f8
Signed-off-by: Flavio Ceolin <979b9165500b0741b9d0500e2efd74fc1547bff7@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17791
Reviewed-by: Kishen Maloor <c62ddea3cd661a9268bff15f07fc2229cdc9ac02@intel.com>
Tested-by: Kishen Maloor <c62ddea3cd661a9268bff15f07fc2229cdc9ac02@intel.com>

iotivity/iotivity-constrained,iotivity/iotivity-constrained,iotivity/iotivity-constrained,iotivity/iotivity-constrained