Change coding style, null check first

DCO-1.1-Signed-Off-By: Kunmyon Choi kunmyon.choi@lge.com