Fix crash on type conversion error

Signed-off-by: Bryce Harrington <b.harrington@samsung.com>