Out of scope for this review but anyhow: Is this if-statement necessary?