Cast variable to avoid php notice