elm: prevent from accessing null pointer after memory allocation
Summary: Add null checking code just after allocating memory
Test Plan: make check
Reviewers: jypark, Jaehyun_Cho, zmike
Reviewed By: Jaehyun_Cho, zmike
Subscribers: devilhorns, zmike, cedric, reviewers, committers
Tags: efl
Differential Revision: https://phab.enlightenment.org/D7801