Fix check for empty posts