Partial If implementation