Adding condition to ensure current is not nil

Missed it in the earlier commit :(