SX(x::T) where {T <: Number} = casadi.SX(x)
SX(x::T) where {T <: AbstractVecOrMat{SX}} = convert(SX, x)
SX(x::AbstractVecOrMat{T}) where {T <: AbstractFloat} = casadi.SX(x)
SX(x::AbstractVecOrMat{T}) where {T <: Integer} = casadi.SX(x)
SX(x::AbstractString) = casadi.SX.sym(x)
SX(x::AbstractString, i1::Integer) = casadi.SX.sym(x, i1)
SX(x::AbstractString, i1::Integer, i2::Integer) = casadi.SX.sym(x, i1, i2)
SX(i1::Integer, i2::Integer) = casadi.SX(i1, i2)

MX(x::T) where {T <: Number} = casadi.MX(x)
MX(x::T) where {T <: AbstractVecOrMat{MX}} = convert(MX, x)
MX(x::AbstractVecOrMat{T}) where {T <: AbstractFloat} = casadi.MX(x)
MX(x::AbstractVecOrMat{T}) where {T <: Integer} = casadi.MX(x)
MX(x::AbstractString) = casadi.MX.sym(x)
MX(x::AbstractString, i1::Integer) = casadi.MX.sym(x, i1)
MX(x::AbstractString, i1::Integer, i2::Integer) = casadi.MX.sym(x, i1, i2)
MX(i1::Integer, i2::Integer) = casadi.MX(i1, i2)

convert(::Type{C}, s::AbstractString) where C <: CasadiSymbolicObject = C(s)
