Add some useless checks for unlikely corner cases

Signed-off-by: Petr Šabata <contyk@redhat.com>