Disabled check for deprecation for this line since it is done in the if-condition already.