remove if else when checking if event, return conditional statement from if clause

Signed-off-by: Ah-Lun Tang <tang@ahlun.be>