Handle error condition if ep could be null
Handle error condition if ep could be null

- address code review comment by Gautam

Signed-off-by: Madhu Challa <a5b616c3796039270c0a077df6257cb57af1aecc@gmail.com>
Change-Id: I348b82901d643e1b570733cf2ee8a4298b9aecb6

opendaylight/opflex,opendaylight/opflex,opendaylight/opflex,opendaylight/opflex