Fixing NPE in case of deleting empty card