Please keep this as comment. 
Can you add "else" in the block above? Thanks.